classDiagram
    class Abstraction {
        -implementation: Implementation
        +setImplementation(imp: Implementation): void
        +operation(): void
    }
    
    class RefinedAbstraction {
        +operation(): void
    }

    class Implementation {
        <<interface>>
        +operationImpl(): void
    }

    class ConcreteImplementationA {
        +operationImpl(): void
    }

    class ConcreteImplementationB {
        +operationImpl(): void
    }

    Abstraction <|-- RefinedAbstraction : extends
    Abstraction --> Implementation : uses >
    Implementation <|-- ConcreteImplementationA : implements
    Implementation <|-- ConcreteImplementationB : implements
